import {connect, useDispatch, useSelector} from "umi"
import {Button} from "antd-mobile";

const DocsPage = ({dispatch, count}) => {
    // const dispatch=useDispatch()       // 获取dispatch
    // const count=useSelector(count=>count)
    return (
    <div>
      <p>This is umi docs.{count.num}</p>
        <Button
            type="primary"
            onClick={() => {
                dispatch({ type: 'count/add' ,payload: {}});
            }}
        >
            添加
        </Button>
    </div>
  );
};


export default connect(count=>count)(DocsPage);
